3.138 \(\int \cot ^2(a+b x) \, dx\)

Optimal. Leaf size=15 \[ -\frac {\cot (a+b x)}{b}-x \]

[Out]

-x-cot(b*x+a)/b

________________________________________________________________________________________

Rubi [A]  time = 0.01, antiderivative size = 15, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 2, integrand size = 8, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.250, Rules used = {3473, 8} \[ -\frac {\cot (a+b x)}{b}-x \]

Antiderivative was successfully verified.

[In]

Int[Cot[a + b*x]^2,x]

[Out]

-x - Cot[a + b*x]/b

Rule 8

Int[a_, x_Symbol] :> Simp[a*x, x] /; FreeQ[a, x]

Rule 3473

Int[((b_.)*tan[(c_.) + (d_.)*(x_)])^(n_), x_Symbol] :> Simp[(b*(b*Tan[c + d*x])^(n - 1))/(d*(n - 1)), x] - Dis
t[b^2, Int[(b*Tan[c + d*x])^(n - 2), x], x] /; FreeQ[{b, c, d}, x] && GtQ[n, 1]

Rubi steps

\begin {align*} \int \cot ^2(a+b x) \, dx &=-\frac {\cot (a+b x)}{b}-\int 1 \, dx\\ &=-x-\frac {\cot (a+b x)}{b}\\ \end {align*}

________________________________________________________________________________________

Mathematica [C]  time = 0.01, size = 29, normalized size = 1.93 \[ -\frac {\cot (a+b x) \, _2F_1\left (-\frac {1}{2},1;\frac {1}{2};-\tan ^2(a+b x)\right )}{b} \]

Antiderivative was successfully verified.

[In]

Integrate[Cot[a + b*x]^2,x]

[Out]

-((Cot[a + b*x]*Hypergeometric2F1[-1/2, 1, 1/2, -Tan[a + b*x]^2])/b)

________________________________________________________________________________________

fricas [A]  time = 0.44, size = 29, normalized size = 1.93 \[ -\frac {b x \sin \left (b x + a\right ) + \cos \left (b x + a\right )}{b \sin \left (b x + a\right )} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(b*x+a)^2/sin(b*x+a)^2,x, algorithm="fricas")

[Out]

-(b*x*sin(b*x + a) + cos(b*x + a))/(b*sin(b*x + a))

________________________________________________________________________________________

giac [B]  time = 0.18, size = 35, normalized size = 2.33 \[ -\frac {2 \, b x + 2 \, a + \frac {1}{\tan \left (\frac {1}{2} \, b x + \frac {1}{2} \, a\right )} - \tan \left (\frac {1}{2} \, b x + \frac {1}{2} \, a\right )}{2 \, b} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(b*x+a)^2/sin(b*x+a)^2,x, algorithm="giac")

[Out]

-1/2*(2*b*x + 2*a + 1/tan(1/2*b*x + 1/2*a) - tan(1/2*b*x + 1/2*a))/b

________________________________________________________________________________________

maple [A]  time = 0.02, size = 21, normalized size = 1.40 \[ \frac {-\cot \left (b x +a \right )-b x -a}{b} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(cos(b*x+a)^2/sin(b*x+a)^2,x)

[Out]

1/b*(-cot(b*x+a)-b*x-a)

________________________________________________________________________________________

maxima [A]  time = 0.63, size = 18, normalized size = 1.20 \[ -\frac {b x + a + \frac {1}{\tan \left (b x + a\right )}}{b} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(b*x+a)^2/sin(b*x+a)^2,x, algorithm="maxima")

[Out]

-(b*x + a + 1/tan(b*x + a))/b

________________________________________________________________________________________

mupad [B]  time = 0.41, size = 15, normalized size = 1.00 \[ -x-\frac {\mathrm {cot}\left (a+b\,x\right )}{b} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(cos(a + b*x)^2/sin(a + b*x)^2,x)

[Out]

- x - cot(a + b*x)/b

________________________________________________________________________________________

sympy [A]  time = 1.08, size = 29, normalized size = 1.93 \[ \begin {cases} - x - \frac {\cos {\left (a + b x \right )}}{b \sin {\left (a + b x \right )}} & \text {for}\: b \neq 0 \\\frac {x \cos ^{2}{\relax (a )}}{\sin ^{2}{\relax (a )}} & \text {otherwise} \end {cases} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(b*x+a)**2/sin(b*x+a)**2,x)

[Out]

Piecewise((-x - cos(a + b*x)/(b*sin(a + b*x)), Ne(b, 0)), (x*cos(a)**2/sin(a)**2, True))

________________________________________________________________________________________